<?php

abstract class H_Controller_Cms_Action extends Zend_Controller_Action
{
    public function init()
    {
        parent::init();
        $this->initLayout();
        $this->view->setTranslate(Zend_Registry::get(H_G::T_AD_TRANSLATE));
//		$this->initAuth();
    }
//	private function initAuth()
//	{
//		$request = $this->_request;
//		if ($request->getModuleName()=='cms')//Chung thuc chi su dung cho cms
//		{
//			if (!Zend_Auth::getInstance()->hasIdentity())
//			{
//				$this->_redirect("cms/authentication/login");
//			}
//		}
//	}
    //-------------------------------
    public function initLayout()
    {
        $option = array ('layout' => 'cmslayout', 'layoutPath' => APPLICATION_PATH.'/templates/cms' );
        $layout = Zend_Layout::startMvc ( $option );
    }
   
    
    public function  postDispatch() {
        parent::postDispatch();        
        $this->view->cController = $this->_request->getControllerName();
        $this->view->cAction = $this->_request->getActionName();
    }

    
     
}

?>